package com.example.emqx.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@TableName("devices_emq_all")
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class DevicesEmqAll {
    // 自动增长
    @TableId(type = IdType.AUTO)
    private Integer id;
    @TableField("clientid")
    private String clientId;
    private int status;
    private int receiveMaximum;
    private String mountPoint;
    private String isBridge;
    private String protoName;
    private String protoVer;
    @TableField("username")
    private String userName;
    private long timestamp;
    private int keepalive;
    private String sockname;
    private String peername;
    private String event;
    private String node;
    private String msgId;
    //    @JsonFormat(shape = JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSXXX",timezone = "UTC")
//    @JsonDeserialize(using = DateToLongDeserializer.class)
//   @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
//    @JsonDeserialize(using = DateToLongDeserializer.class)
    private Date time;


}
